package com.yonyou.sto.modules.ims.service;

import com.yonyou.sto.common.api.CommonResult;
import com.yonyou.sto.modules.ims.dto.CallbackInvoiceParam;
import com.yonyou.sto.modules.ims.model.ImsBill;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author aegon
 * @since 2020-10-10
 */
public interface ImsBillService extends IService<ImsBill> {

    /**
     * 分页查询数据
     * @param pageSize
     * @param pageNum
     * @param billSn
     * @param sellerName
     * @param buyerName
     * @param status
     * @param startTime
     * @param endTime
     * @return
     */
    CommonResult<Map<String, Object>> list(String username, Integer pageSize, Integer pageNum, String billNo, String billCode, String billSerial, String billSn, String sellerName, String buyerName, Integer status, Integer billType, String startTime, String endTime);

    CommonResult<Map<String, Object>> listApply(String username, Integer pageSize, Integer pageNum, String billNo, String billCode, String billSerial, String billSn, String sellerName, String buyerName, Integer status, Integer billType, String startTime, String endTime);

    /**
     * 添加发票信息
     * @param
     * @param billSn
     * @return
     */
    boolean splitAddBill(String billSn, List<Map<String, Object>> result);
    /**
     * 添加开票发票信息
     * @param
     * @param billSn
     * @return
     */
    boolean splitAddOpenBill(String billSn, List<Map<String, Object>> result);

    /**
     * 修改发票信息
     * @param param
     * @param
     * @return
     */
    String updateBySerial(CallbackInvoiceParam param);

    /**
     * 发票明细
     * @param id
     * @return
     */
    CommonResult info(Long id);

    /**
     * 批量作废发票
     * @param
     * @return
     */
    CommonResult<String> cancel(List<Long> billIds);

    CommonResult<String> redSpecialBill(List<Long> billIds);
}
